package com.lee.blog.service;

import com.lee.blog.bean.Message;
import com.lee.blog.mapper.MessageMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MessageService {

    @Autowired
    MessageMapper messageMapper;

    public List<Message> getNewMessage(){
        return messageMapper.getNewMessage();
    }

    public int getMessageCount(){
        return messageMapper.getMessageCount();
    }

    public List<Message> getAllMessage(){
        return messageMapper.getAllMessage();
    }

    public void doMessage(Message message){
        messageMapper.doMessage(message);
    }

}
